<div class="d-flex justify-content-center">
    <ul class="pagination">
        <!-- total_pages -->
        @if ( ($pagination['per_page'] == 1) && ($pagination['last_page'] == 1) or $filterValue )
            <li class="page-item disabled"><a class="page-link" href="#">First</a></li>
            <li class="page-item disabled"><a class="page-link" href="#">Previous</a></li>
            <li class="page-item disabled"><a class="page-link" href="#">Next</a></li>
            <li class="page-item disabled"><a class="page-link" href="#">Last</a></li>
        @else
            @if ( ($pagination['per_page'] == 2) && ($pagination['last_page'] == 2) )
                <li class="page-item"><a class="page-link" href="{{ $links['first'] }}">First</a></li>
                <li class="page-item disabled"><a class="page-link" href="#">Previous</a></li>
                <li class="page-item disabled"><a class="page-link" href="#">Next</a></li>
                <li class="page-item"><a class="page-link" href="{{ $links['last'] }}">Last</a></li>
            @else
                <!-- first -->
                @if (isset($links['first']) && !empty($links['first']))
                    <li class="page-item"><a class="page-link" href="{{ $links['first'] }}">First</a></li>
                @else
                    <li class="page-item disabled"><a class="page-link" href="#">First</a></li>
                @endif
                <!-- previous -->
                @if (isset($links['prev']) && !empty($links['prev']))
                    <li class="page-item"><a class="page-link" href="{{ $links['prev'] }}">Previous</a></li>
                @else
                    <li class="page-item disabled"><a class="page-link" href="#">Previous</a></li>
                @endif
                <!-- next -->
                @if (isset($links['next']) && !empty($links['next']))
                    <li class="page-item"><a class="page-link" href="{{ $links['next'] }}">Next</a></li>
                @else
                    <li class="page-item disabled"><a class="page-link" href="#">Next</a></li>
                @endif
                <!-- last -->
                @if (isset($links['last']) && !empty($links['last']))
                    <li class="page-item"><a class="page-link" href="{{ $links['last'] }}">Last</a></li>
                @else
                    <li class="page-item disabled"><a class="page-link" href="#">Last</a></li>
                @endif
            @endif
        @endif
    </ul>
</div>
